package com.xiaomi.mapper;

import com.xiaomi.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName UserMapper
 * @Description TODO
 * @Author lll
 * @Date 2021/11/28 13:12
 * @Version 1.0
 **/
public interface UserMapper {
    /**
     * @MethodName pageSerach
     * @Description 列表查询
     * @Param startRow
     * @Param limit
     * @Param id
     * @Param name
     * @Return java.util.List<com.xiaomi.entity.User>
     * @Author lilingling
     * @Date 2021/11/27 16:55
     **/
    List<User> pageSearch(@Param(value = "startRow") Integer startRow,
                          @Param(value = "limit") Integer limit,
                          @Param(value = "id") Integer id,
                          @Param(value = "name") String name);

    /**
     * @MethodName getCount
     * @Description 获取总条数
     * @Param id
     * @Param name
     * @Return java.lang.Integer
     * @Author lilingling
     * @Date 2021/11/27 16:55
     **/
    Integer getCount(@Param(value = "id") Integer id,
                     @Param(value = "name") String name);

    /**
     * @MethodName insert
     * @Description 新增
     * @Param zhanghao
     * @Param name
     * @Param phone
     * @Param userpwd
     * @Return java.lang.Integer
     * @Author lilingling
     * @Date 2021/11/27 16:55
     **/
    Integer insert(@Param(value = "zhanghao") String zhanghao,
                   @Param(value = "name") String name,
                   @Param(value = "phone") String phone,
                   @Param(value = "userpwd") String userpwd,
                   @Param(value = "dizhiId") Integer dizhiId,
                   @Param(value = "carId") Integer carId);

    /**
     * @MethodName update
     * @Description 修改
     * @Param zhanghao
     * @Param name
     * @Param phone
     * @Param userpwd
     * @Param id
     * @Return java.lang.Integer
     * @Author lilingling
     * @Date 2021/11/27 16:56
     **/
    Integer update(@Param(value = "zhanghao") String zhanghao,
                   @Param(value = "name") String name,
                   @Param(value = "phone") String phone,
                   @Param(value = "userpwd") String userpwd,
                   @Param(value = "dizhiId") Integer dizhiId,
                   @Param(value = "carId") Integer carId,
                   @Param(value = "id") Integer id);

    /**
     * @MethodName delete
     * @Description 删除
     * @Param id
     * @Return java.lang.Integer
     * @Author lilingling
     * @Date 2021/11/27 16:56
     **/
    Integer delete(@Param(value = "id") Integer id);


}
